package com.zeroxml.cms.web.action.admin;

import com.zeroxml.cms.web.action.BaseAdminAction;
import com.zeroxml.cms.service.IScrapeService;
import net.sourceforge.stripes.action.UrlBinding;
import net.sourceforge.stripes.action.Resolution;
import net.sourceforge.stripes.action.DefaultHandler;
import net.sourceforge.stripes.integration.spring.SpringBean;

/**
 * Created by IntelliJ IDEA.
 * User: wangchao
 * Date: 2007-10-6
 * Time: 13:24:10
 * To change this template use File | Settings | File Templates.
 */
@UrlBinding("/admin/scrapeOpenOpen.do")
public class ScrapeOpenOpenAction extends BaseAdminAction {
    @SpringBean
    private IScrapeService scrapeService;

    public void setScrapeService(IScrapeService scrapeService) {
        this.scrapeService = scrapeService;
    }
    @DefaultHandler
    public Resolution scrape() {
        scrapeService.scrapeCatalogs();
        return getAdminResolution("success");
    }
}
